import request from '@/utils/request'

/**
 * @description: 获取员工列表
 * @param {*} params 参数
 * @return {*} promise
 */
export const getemployeelistAPI = params => {
  return request.get('/park/sys/user', { params })
}

/**
 * @description: 添加员工
 * @param {*} data 参数
 * @return {*} promise
 */
export const addemployeeAPI = data => {
  return request.post('/park/sys/user', data)
}

/**
 * @description: 回显员工
 * @param {*} id 参数
 * @return {*} promise
 */
export const viewemployeeAPI = id => {
  return request.get(`/park/sys/user/${id}`)
}

/**
 * @description: 编辑员工
 * @param {*} data 参数
 * @return {*} promise
 */
export const editemployeeAPI = data => {
  return request.put(`/park/sys/user`, data)
}

/**
 * @description: 删除员工
 * @param {*} id 参数
 * @return {*} promise
 */
export const deleteemployeeAPI = id => {
  return request.delete(`/park/sys/user/${id}`)
}

/**
 * @description: 重置密码
 * @param {*} data 参数
 * @return {*} promise
 */
export const resetpasswordAPI = id => {
  return request.put('/park/sys/user/resetPwd', { id })
}
